home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / lzop < prev    next >
Encoding:
Text File  |  2010-11-16  |  1.6 KB  |  69 lines

  1. # lzop(1) completion
  2.  
  3. have lzop &&
  4. _lzop()
  5. {
  6.     local cur prev xspec
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur prev
  10.  
  11.     if [[ "$cur" == -* ]]; then
  12.         COMPREPLY=( $( compgen -W '-1 -2 -3 -4 -5 -6 -7 -8 -9 -P \
  13.             --fast --best --decompress --extract --test --list --ls --info \
  14.             --sysinfo --license --help --version --stdout --output --path \
  15.             --force --no-checksum --no-name --name --no-mode --no-time \
  16.             --suffix --keep --delete --crc32 --no-warn --ignore-warn --quiet \
  17.             --verbose --no-stdin --filter --checksum --no-color --mono \
  18.             --color' -- "$cur" ) )
  19.         return 0
  20.     fi
  21.  
  22.     case $prev in
  23.         -o|--output)
  24.             _filedir
  25.             return 0
  26.             ;;
  27.         --path)
  28.             _filedir -d
  29.             return 0
  30.             ;;
  31.         -S|--suffix)
  32.             return 0
  33.             ;;
  34.     esac
  35.  
  36.     xspec="*.?(t)lzo"
  37.     case $prev in
  38.         --decompress|--uncompress|--extract|--list|--ls|--info|--test)
  39.             xspec="!"$xspec
  40.             ;;
  41.         --force)
  42.             xspec=
  43.             ;;
  44.         --*)
  45.             ;;
  46.         -*f*|'<'|'>')
  47.             xspec=
  48.             ;;
  49.         -*[dltx]*)
  50.             xspec="!"$xspec
  51.             ;;
  52.     esac
  53.  
  54.     _expand || return 0
  55.  
  56.     local IFS=$'\t\n'
  57.     COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
  58.             $( compgen -d -- "$cur" ) )
  59. } &&
  60. complete -F _lzop -o filenames lzop
  61.  
  62. # Local variables:
  63. # mode: shell-script
  64. # sh-basic-offset: 4
  65. # sh-indent-comment: t
  66. # indent-tabs-mode: nil
  67. # End:
  68. # ex: ts=4 sw=4 et filetype=sh
  69.